package com.project.server.domain.operate;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.project.common.annotation.Excel;
import com.project.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 运营管理广告对象 t_operate_advertisement
 *
 * @author project
 * @date 2021-06-29
 */
public class TOperateAdvertisement extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 广告ID
     */
    private Long advertisementId;

    /**
     * 封面图片
     */
    private String imgSrc;

    /**
     * 广告链接地址
     */
    @Excel(name = "广告链接地址")
    private String url;

    /**
     * 广告简述
     */
    @Excel(name = "广告简述")
    private String sketch;

    /**
     * 开始展示时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始展示时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 排序
     */
    private String sort;

    /**
     * 状态 1 正常 2 禁用
     */
    @Excel(name = "状态", readConverterExp = "1=正常,2=禁用")
    private String status;

    /**
     * 广告位置（00代表左侧,01代表右侧,02代表banner,03代表列表页）
     */
    @Excel(name = "广告位置", readConverterExp = "00=左侧,01=右侧,02=banner,03=列表页")
    private String place;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    public void setAdvertisementId(Long advertisementId) {
        this.advertisementId = advertisementId;
    }

    public Long getAdvertisementId() {
        return advertisementId;
    }

    public void setImgSrc(String imgSrc) {
        this.imgSrc = imgSrc;
    }

    public String getImgSrc() {
        return imgSrc;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setSketch(String sketch) {
        this.sketch = sketch;
    }

    public String getSketch() {
        return sketch;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getSort() {
        return sort;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getPlace() {
        return place;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("advertisementId", getAdvertisementId())
                .append("imgSrc", getImgSrc())
                .append("url", getUrl())
                .append("sketch", getSketch())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("sort", getSort())
                .append("status", getStatus())
                .append("place", getPlace())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
